package com.shenmazong.service.impl;

import com.shenmazong.entity.TbQuestion;
import com.shenmazong.mapper.TbQuestionMapper;
import com.shenmazong.service.TbQuestionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.ListParamVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 答辩问题表 ——> John 服务实现类
 * </p>
 *
 * @author 还怕大雨吗-
 * @since 2021-09-21
 */
@Service
public class TbQuestionServiceImpl extends ServiceImpl<TbQuestionMapper, TbQuestion> implements TbQuestionService {

    @Resource
    private TbQuestionMapper tbQuestionMapper;


    /***
     * @description 根据分类，生成答辩题
     * @params [listParamVo]
     * @return com.shenmazong.utils.ResultResponse
     * @author -还怕大雨吗
     * @date 2021/9/27 18:42
     */
    @Override
    public ResultResponse selectQuestion(ListParamVo listParamVo) {
        Object type = listParamVo.getParamMap().get("type");
        List<TbQuestion> list = tbQuestionMapper.selectQuetion(type);
        return ResultResponse.SUCCESS(list);
    }
}
